home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mission 3
/
Mission 3.zip
/
Mission 3.iso
/
spiele
/
sgac
/
manual
/
chapter4.doc
< prev
next >
Wrap
Text File
|
1989-07-28
|
8KB
|
199 lines
Chapter four
(Other Zones)
Lines 4150 to 4440 (Speak Events)
These zones are used for speaking to characters on screen, using
them are easy, if you have set them with the creator then you
can access them like this.
4150 if Z=1 and LOCATION=4 then print MESSAGE$(9) : DONE=1
So by clicking on a character with the Speak Option enables you
to speak, this line checks if Speak Zone 1 has been clicked on
and the player's at location four.
You could use a Speak Event to ask a character for an object,
this would bring the object from the not created location to the
players carried location like so.
4160 if Z=2 and LOCATION=10 and OBLOC(3)=NC then OBLOC(3)=CARRIED
: print MESSAGE$(12) : DONE=1
Don't forget the DONE=1 at the end of each line, also remember to
add the "and LOCATION=" part to the line otherwise the game will
carry out the line in every location with Speak Zones.
Lines 4740 to 5030 (Give Events)
Give Events are used in the same way as Speak Events except we
use it to give objects to another Character.
Every time the Give option is used in the game, the Object ID
word is entered into a varible called GIVE$, so we can check for
an object being given to a character like this.
4740 if GIVE$="Bag" and Z=1 and LOCATION=15 and BAG=0 then
OBLOC(10)=NC : BAG=1 : print MESSAGE$(12) : DONE=1
Note the varible BAG, this is set to nought if the character
does'nt have the bag or set to one if he does.
You could use a Special Examine Location Event to tell the player
that the character has the bag.
Lines 5790 to 6080 (Open Events)
Enter in the same way as speak events but used to open.
Example:
5790 if Z=1 and LOCATION=8 and DO=0 then MAP(8,1)=9 : DO=1 :
print MESSAGE$(20) : DONE=1
The varible DO would be set to 0 if closed and 1 if open. Note
the MAP array is used to connect Exit Zone 1 to location 9.
Lines 6240 to 6530 (Close Events)
Same as open but used to close things that are open.
Example:
6240 if Z=1 and LOCATION=8 and DO=1 then MAP(8,1)=0 : DO=0 :
print MESSAGE$(14) : DONE=1
Note how we now set the DO varible to nought to indicate the door
is closed, the Exit Zone is also un-connected.
Lines 6750 to 7040 (Special Wear Events)
Normally, any object selected to wear would go to the Wear
location and the game tells the player he's wearing it. But if
the player puts on a robe, it could have special effects on him.
The Object ID word goes into a varible called WEAR$ so we can use
this to make wearing the robe create a magical effect.
6750 if WEAR$="Robe" then print MESSAGE$(15) : ROBE=1
Game message 15 could give the player the power to speak to
creatures in there own language, this is indicated by the ROBE
varible which is set to 1 if he can.
Lines 7250 to 7540 (Special Remove Events)
As with Remove, this section deals with things happening when an
object is removed, removing your clothes would cause no problems
in your own house but removing them in the street could get you
in trouble. The Object's ID word is entered in a varible called
RE$ and is used like this.
7250 if RE$="Clothes" and LOCATION>5 then print MESSAGE$(22) :
goto DEATH
This line would end the game if you removed your clothes in the
street, note that the line checks if the player is in one of the
locations from five onwards, the first five locations could be
the rooms of your house and the rest could be outside.
Lines 7740 to 8030 (Use Object Events)
Using an object could apply to anything from using a lamp to
light it or using a using a guitar, meaning, play it. The Object
ID word is entered into a USE$ varible and used like this.
7740 if USE$="Guitar" then print MESSAGE$(6) : DONE=1
This line allows you to play the guitar in any location but it
can easily be changed to happen at a certain location to create
an effect where the above line would just allow the player to
play the guitar and get no responce.
You can also use an Event to light a lamp by defining a lit lamp
and an unlit lamp and use the method concern the Vase and Broken
Vase in Chapter three.
Lines 8170 to 8460 (Use on Events)
These events are used for using an object on part of the location
picture which can range from using a key on a door to open it or
using a sword on a dragon to kill it.
This is done with the USE$ varible and Use Zones like this.
8170 if USE$="Sword" and Z=3 and LOCATION=10 and DRAGON=1 then
DRAGON=0 : print MESSAGE$(30) : SC=SC+50 : DONE=1
So this line allows you to use a sword on a dragon which is then
killed, using this method to unlock a door could be done the same
way by simply setting a varible to indicate the state of the
door, nought if locked and one if unlocked.
Lines 8640 to 8940 (Consume Events)
You can use these events to allow the player to eat or drink
something, this line allows the player to eat a cake.
8640 if CONSUME$="Cake" then OBLOC(1)=NC : print MESSAGE$(1) :
DONE=1
So, once the cake is eaten, it leaves the game by becoming a not
created object, if you wanted the cake to contain poison which
kills the player when he eats it, all you have to do is add a
"goto DEATH" at the end of the above line.
Lines 9000 onwards (Your own routines)
This section is for your own bits that you may want to add to the
game to make it more interesting, it is mainly used to make
characters appear on location pictures.
Inside the Garden.dat folder is the source code for Grannies
Garden, if you load it and list lines 9000 onwards you will see
that we can use the Stos "screen$" command to put the characters
on screen. Here is a step by step guide to doing it.
Draw the picture of your character using an art package
Reserve a spare Stos bank and load your picture into it.
Example: reserve as datascreen 4 : load"dwarf.pi1",4
Load the Stos mouse accessory and get the co-ordinates of the
picture starting from the top left hand corner of the drawing and
noting down the X and Y numbers then do the same for the bottom
right hand corner of the drawing.
We can now put this drawing into a varible using SCREEN$.
9010 if LOCATION=5 and DWARF=1 then DWARF$=screen$(4,10,10 to
50,50) : screen$(5,100,50)=DWARF$ : screen copy 5 to back :
screen copy 5 to physic
9020 return
So the idea is to take the drawing of the dwarf from the picture
in bank 4 and enter it into the varible DWARF$ using the first
version of screen$ then it is pasted onto the location picture in
bank 5 at the co-ordinates 100,50 and the location picture which
is always in bank 5 is put back onto the back and physic
screens. The RETURN command must be used after the last routine
as this section was called by the subroutine at line 500.
Remember that the palette of your drawing must be the same as the
one of the location picture.
Well that brings us to the end of the final chapter, I expect you
are buzzing with ideas and ready to create your own games, so
I'll leave you to it, I hope you enjoy using this package as much
as we've enjoyed writing it and if you have any problems or just
wish to write for a chat then you can get in touch with us by our
address in the intro.doc file.
Happy creating
Deano and Tony of Silly Software.